package com.dynamixsoftware.printershare.smb.dcerpc.msrpc;

import com.dynamixsoftware.printershare.smb.FileEntry;
import com.dynamixsoftware.printershare.smb.SmbShareInfo;

public class MsrpcShareEnum extends srvsvc.ShareEnumAll {
	public MsrpcShareEnum(String paramString) {
		super("\\\\" + paramString, 1, new srvsvc.ShareInfoCtr1(), -1, 0, 0);
		this.ptype = 0;
		this.flags = 3;
	}

	public FileEntry[] getEntries() {
		srvsvc.ShareInfoCtr1 localShareInfoCtr1 = (srvsvc.ShareInfoCtr1) this.info;
		MsrpcShareInfo1[] arrayOfMsrpcShareInfo1 = new MsrpcShareInfo1[localShareInfoCtr1.count];
		for (int i = 0; i < localShareInfoCtr1.count; i++) {
			arrayOfMsrpcShareInfo1[i] = new MsrpcShareInfo1(localShareInfoCtr1.array[i]);
		}
		return arrayOfMsrpcShareInfo1;
	}

	private class MsrpcShareInfo1 extends SmbShareInfo {
		private MsrpcShareInfo1(srvsvc.ShareInfo1 paramShareInfo1) {
			this.netName = paramShareInfo1.netname;
			this.type = paramShareInfo1.type;
			this.remark = paramShareInfo1.remark;
		}
	}
}